import { Table } from 'antd';
import React from 'react'

function Tabll({ setPageNum, setPageSize, pageSize, pageNum, total, data, columns }) {

    return (
        <div>
            <Table dataSource={data} columns={columns}
                pagination={
                    {
                        total: total,
                        pageNum: pageNum,
                        pageSize: pageSize,
                        onChange: (page, pagesize) => {
                            setPageSize(pagesize)
                            setPageNum(page)
                        }
                    }
                }

            />;
        </div>
    )
}

export default React.memo(Tabll)
